using System.Linq;
using UnityEngine;


/// <summary>
/// 自定义控制台
/// </summary>
public static class Console
{
    public static void Log(object title, params object[] param)
    {
        var message = "<color=#00FF65>" + title + "</color>";
        MessageBlend(ref message, param);
        Debug.Log(message);
    }


    public static void LogWarning(object title, params object[] param)
    {
        var message = "<color=##00FF65>" + title + "</color>";
        Debug.LogWarning(message);
    }

    public static void LogError(object title, params object[] param)
    {
        var message = "<color=##00FF65>" + title + "</color>";
        Debug.LogWarning(message);
    }

    private static void MessageBlend(ref string message, params object[] param)
    {
        message = param.Aggregate(message, (current, item) => current + (item + ","));
        message.Remove(message.Length - 1);
    }
}